/**
 * Created by qian.zhou on 2017/2/23.
 */

var React = require('react');

module.exports = React.createClass({
    getInitialState:function(){
        return {
            gjlist:[]
        }
    },
    componentDidMount:function(){
    },
    render:function(){
        var p = this;
        var prolist = localStorage.getItem("prolist");
        var list = JSON.parse(prolist);
        var  gjlist = list.map(function(obj){
           return (
                <div key={obj.pid} className="item">
                    <div className="pro-img">
                        <img id="pic" src={obj.purl}/>
                    </div>
                    <div className="pro-msg">
                        <p className="item_title">{obj.name}</p>
                        <p className="item_price">{obj.spec}</p>
                    </div>
                    <div className="pro-add">
                        <div className="pro_price">
                            <span>￥{obj.price}</span>
                        </div>
                        <div className="add_pro_cart">
                            <img src="images/add_cart.png"/>
                        </div>
                    </div>
                </div>
            )
        });
        return (
            <div>{gjlist}</div>
        )
    }
});